cvl (response, penalized, unpenalized, lambda1 = 0, lambda2 = 0,
data, model = c("cox", "logistic", "linear"), startbeta,
startgamma, fold, epsilon = 1e-10, maxiter, standardize = FALSE,
trace = TRUE)
optL1 (response, penalized, unpenalized, minlambda1, maxlambda1,
lambda2 = 0, data, model = c("cox", "logistic", "linear"),
startbeta, startgamma, fold, epsilon = 1e-10, maxiter,
standardize = FALSE, trace = TRUE, tol = .Machine$double.eps^0.25)
optL2 (response, penalized, unpenalized, lambda1 = 0, minlambda2,
maxlambda2, data, model = c("cox", "logistic", "linear"),
startbeta, startgamma, fold, epsilon = 1e-10, maxiter,
standardize = FALSE, trace = TRUE, tol = .Machine$double.eps^0.25)
profL1 (response, penalized, unpenalized, minlambda1, maxlambda1,
lambda2 = 0, data, model = c("cox", "logistic", "linear"), startbeta,
startgamma, fold, epsilon = 1e-10, maxiter, standardize = FALSE,
trace = TRUE, steps = 100, autominsteps = steps/5, log = FALSE)
profL2 (response, penalized, unpenalized, lambda1 = 0, minlambda2,
maxlambda2, data, model = c("cox", "logistic", "linear"), startbeta,
startgamma, fold, epsilon = 1e-10, maxiter, standardize = FALSE,
trace = TRUE, steps = 100, autominsteps = steps/5, log = TRUE)Surv object for Cox regression and
a vector of 0/1 values for logistic regression.formula object.
See also under data.penalized.
Note that an unpenalized intercept is included in the model by default (except in the cox model).
This can be suppressed by specifying unpenalized = ~0.data.frame used to evaluate response, and the terms of
penalized or unpenalized when these have been specified as a
formula object.response input.lambda1 and lambda2.lambda1 and lambda2.n
vector with values in 1:fold, specifying exactly which subjects are assigned
to wglm.
Convergence is judged separately on the likelihood and on the penalty.TRUE, standardizes all penalized covariates to
unit central L2-norm before applying penalization.TRUE, prints progress information. Note that setting
trace=TRUE may slow down the algorithm (but it often feels quicker)minlambda1 and
maxlambda1 or minlambda2 and maxlambda2 at which the cross-validated likelihood is to
be calculated.minlambda1 and
maxlambda1 or minlambda2 and maxlambda2 at which the cross-validated likelihood is to
be calculated. If autominsteps is smaller than FALSE, the steps between minlambda1 and
maxlambda1 or minlambda2 and maxlambda2 are equidistant on a linear scale, if TRUE
on a logaritmic scale. Please note the different optimize.penalized, penfit, plotpath.data(nki70)
# Finding an optimal crossvalidated likelihood
attach(nki70)
opt <- optL1(Surv(time, event), penalized = nki70[,8:77], fold = 10)
coefficients(opt$fullfit)
plot(opt$predictions)
# Plotting the profile of the crossvalidated likelihood
prof <- profL1(Surv(time, event), penalized = nki70[,8:77],
fold = opt$fold, steps=20)
plot(prof$lambda, prof$cvl, type="l")
plotpath(prof$fullfit)Run the code above in your browser using DataLab